home *** CD-ROM | disk | FTP | other *** search
/ 10,000 Great Games / 10,000 Great Games.iso / Product / 66 / data1.cab / Source_Files / Src / Hurting.cpp < prev    next >
C/C++ Source or Header  |  2000-01-16  |  513b  |  38 lines

  1. #include "stdafx.h"
  2.  
  3. cHurting::cHurting(int _x, int _y, cProperties *orig)
  4.         : cWeapon(_x, _y, orig, "MOVING")
  5.     // Set other
  6.     
  7.     active_wait = 0;
  8.  
  9.     circle_bounds = 0;
  10.     
  11.     push_moving_direction = FALSE;
  12.  
  13.     move_object_after_hit = FALSE;
  14. }
  15.  
  16. cHurting::~cHurting()
  17. {
  18. }
  19.  
  20. int cHurting::control()
  21. {
  22.     cWeapon::control();
  23.     
  24.     // Hit stuff
  25.  
  26.     if (!active_wait)
  27.     {
  28.         check_radial_hit_more(orig->circle);
  29.             
  30.         active_wait = sec / 5;
  31.     }
  32.  
  33.     // Delete when off screen
  34.     
  35.     return !in_water();
  36. }
  37.